package com.graduation_design.modules.app.controller;

import com.graduation_design.common.lang.Result;
import com.graduation_design.service.AppHomeService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@Slf4j
@RestController
@RequestMapping("/app")
public class HomeController {

    @Resource
    AppHomeService homeService;

    /**
     * 首页数据
     */
    @GetMapping("/home")
    public Result home() {
        return Result.success(homeService.getContents());
    }
}
